/PROG  T2D_T1P
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "T2 DR -> T1 PK";
PROG_SIZE	= 2191;
CREATE		= DATE 12-10-08  TIME 17:19:50;
MODIFIED	= DATE 15-05-26  TIME 15:57:26;
FILE_NAME	= T2D_T1P;
VERSION		= 0;
LINE_COUNT	= 55;
MEMORY_SIZE	= 2603;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:   ;
   2:  LBL[10] ;
   3:  UFRAME_NUM=0 ;
   4:  UTOOL_NUM=1 ;
   5:  IF DI[14:ATC UNCHUCK OK]=ON OR DI[25:TOOL #1]=OFF,JMP LBL[90] ;
   6:  TIMER[10]=RESET ;
   7:  TIMER[10]=START ;
   8:   ;
   9:J P[2:CLEAR] 50% CNT100 ACC70    ;
  10:L P[4:APPROACH] 200mm/sec CNT50 ACC70    ;
  11:  WAIT DI[26:TOOL #2]=OFF    ;
  12:L P[5:APPROACH] 300mm/sec CNT50    ;
  13:L P[6:APPROACH] 300mm/sec FINE    ;
  14:L P[7:DROP] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  15:  DO[21:TOOL2 POS]=ON ;
  16:  DO[13:REQ ATC CHUCK]=OFF ;
  17:  DO[14:REQ ATC UNCHUCK]=ON ;
  18:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  19:  WAIT   1.00(sec) ;
  20:  DO[14:REQ ATC UNCHUCK]=OFF ;
  21:L P[8:APPROACH] 100mm/sec CNT50 ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  22:  WAIT DI[26:TOOL #2]=ON    ;
  23:L P[9:APPROACH] 300mm/sec CNT50    ;
  24:L P[10:APPROACH] 300mm/sec CNT50    ;
  25:L P[2:CLEAR] 100mm/sec CNT50 ACC70    ;
  26:   ;
  27:J P[1:CLEAR] 50% CNT50    ;
  28:J P[3:CLEAR] 50% CNT50    ;
  29:L P[11:APPROACH] 200mm/sec CNT50 ACC70    ;
  30:  WAIT DI[25:TOOL #1]=ON    ;
  31:L P[12:APPROACH] 300mm/sec CNT50    ;
  32:L P[13:APPROACH] 300mm/sec FINE    ;
  33:  DO[13:REQ ATC CHUCK]=OFF ;
  34:  DO[14:REQ ATC UNCHUCK]=ON ;
  35:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  36:  WAIT    .50(sec) ;
  37:L P[14:PICK] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  38:  WAIT   1.00(sec) ;
  39:  DO[21:TOOL2 POS]=ON ;
  40:  DO[14:REQ ATC UNCHUCK]=OFF ;
  41:  DO[13:REQ ATC CHUCK]=ON ;
  42:  WAIT DI[13:ATC CHUCK OK]=ON    ;
  43:  WAIT   1.00(sec) ;
  44:L P[15:APPROACH] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  45:L P[16:APPROACH] 300mm/sec CNT50    ;
  46:L P[11:APPROACH] 300mm/sec CNT50    ;
  47:L P[17] 600mm/sec CNT30    ;
  48:   ;
  49:  MOVE TO HOME    ;
  50:  TIMER[10]=STOP ;
  51:   ;
  52:  END ;
  53:   ;
  54:  LBL[90] ;
  55:  MESSAGE[ERROR: T2 DETECT OR NOT] ;
/POS
P[1:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2056.543  mm,	Y =      .052  mm,	Z =  -527.289  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -179.998 deg,
	E1=   107.700 deg
};
P[2:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3246.551  mm,	Y =  -862.831  mm,	Z =  -527.000  mm,
	W =  -180.000 deg,	P =      .000 deg,	R =   -87.929 deg,
	E1=    18.100 deg
};
P[3:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3066.683  mm,	Y =   759.262  mm,	Z =  -550.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =    90.000 deg,
	E1=    15.885 deg
};
P[4:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.667  mm,	Y =  -715.740  mm,	Z = -1208.932  mm,
	W =  -180.000 deg,	P =    89.585 deg,	R =   -90.000 deg,
	E1=    15.885 deg
};
P[5:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3224.396  mm,	Y =  -724.026  mm,	Z = -1368.259  mm,
	W =  -179.963 deg,	P =    89.545 deg,	R =   -89.660 deg,
	E1=    15.882 deg
};
P[6:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3224.395  mm,	Y =  -502.905  mm,	Z = -1368.259  mm,
	W =  -179.970 deg,	P =    89.545 deg,	R =   -89.668 deg,
	E1=    15.882 deg
};
P[7:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3224.477  mm,	Y =  -502.825  mm,	Z = -1442.349  mm,
	W =  -179.616 deg,	P =    89.546 deg,	R =   -89.314 deg,
	E1=    15.882 deg
};
P[8:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,	
	J1=   -21.960 deg,	J2=   -11.553 deg,	J3=    71.601 deg,
	J4=   -82.181 deg,	J5=  -110.915 deg,	J6=   289.937 deg,
	E1=    15.882 deg
};
P[9:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3226.553  mm,	Y =  -713.811  mm,	Z = -1246.278  mm,
	W =   -26.313 deg,	P =    89.984 deg,	R =    63.463 deg,
	E1=    15.882 deg
};
P[10:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3226.812  mm,	Y =  -716.000  mm,	Z = -1048.927  mm,
	W =   179.359 deg,	P =    89.587 deg,	R =   -90.643 deg,
	E1=    15.885 deg
};
P[11:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3225.502  mm,	Y =   822.924  mm,	Z = -1058.245  mm,
	W =   179.223 deg,	P =    68.879 deg,	R =    89.170 deg,
	E1=    15.749 deg
};
P[12:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.301  mm,	Y =   738.603  mm,	Z = -1283.466  mm,
	W =  -179.598 deg,	P =    89.667 deg,	R =    90.402 deg,
	E1=    15.885 deg
};
P[13:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.029  mm,	Y =   692.074  mm,	Z = -1445.982  mm,
	W =   160.958 deg,	P =    89.176 deg,	R =    71.401 deg,
	E1=    14.171 deg
};
P[14:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.030  mm,	Y =   489.000  mm,	Z = -1447.022  mm,
	W =   160.962 deg,	P =    89.176 deg,	R =    71.405 deg,
	E1=    14.171 deg
};
P[15:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.029  mm,	Y =   489.785  mm,	Z = -1368.764  mm,
	W =   160.965 deg,	P =    89.176 deg,	R =    71.408 deg,
	E1=    14.171 deg
};
P[16:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.029  mm,	Y =   650.275  mm,	Z = -1366.733  mm,
	W =   160.966 deg,	P =    89.176 deg,	R =    71.410 deg,
	E1=    14.171 deg
};
P[17]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3066.683  mm,	Y =   759.262  mm,	Z =  -550.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =    90.000 deg,
	E1=    15.885 deg
};
/END
